package com.ccys.db.entity;

import com.ccys.db.rely.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Column;
import javax.persistence.Table;
import java.util.Date;

/**
* Created by Mybatis Generator on 2023/12/08
*/
@Data
@Table(name = "tbl_news")
@NoArgsConstructor
@AllArgsConstructor
public class TblNews extends BaseEntity {
    private String title;

    private Integer status;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Column(name = "start_date")
    private Date startDate;

    private Integer pinned;

    @Column(name = "show_homepage")
    private Integer showHomepage;

    @Column(name = "show_future_user")
    private Integer showFutureUser;

    private String image;

    /**
     * 1	AIA corporate;2	direct corporate;3	AIA HealthShield;4	Subscription Package;5	Ltria Corporate;6	AIA Absolute Critical Cover
     */
    @Column(name = "target_type")
    @ApiModelProperty("1	AIA corporate;2	direct corporate;3	AIA HealthShield;4	Subscription Package;5	Ltria Corporate;6	AIA Absolute Critical Cover")
    private Integer targetType;

    @Column(name = "job_id")
    private String jobId;

    /**
     * 0	Subscription;1	General Practitioner;2	Mental Wellness;3	Paediatrician;4:URL ;8:ThinkWell

     */
    @Column(name = "news_route_users")
    @ApiModelProperty("0	Subscription;1	General Practitioner;2	Mental Wellness;3	Paediatrician;4:URL ;8:ThinkWell ")
    private Integer newsRouteUsers;

    @Column(name = "total_sent")
    private Integer totalSent;

    @Column(name = "current_sent")
    private Integer currentSent;

    /**
     * 是否Call to action
     */
    @Column(name = "news_is_show_content")
    @ApiModelProperty("是否Call to action")
    private Boolean newsIsShowContent;

    /**
     * targetType 为AIA corporate 时,1:list;2:file upload
     */
    @Column(name = "news_select_by")
    @ApiModelProperty("targetType 为AIA corporate 时,1:list;2:file upload")
    private Integer newsSelectBy;

    /**
     * 存储 targetType 为AIA corporate 是上传文件解析后选中的benched
     */
    @Column(name = "news_select_bencode")
    @ApiModelProperty("存储 targetType 为AIA corporate 是上传文件解析后选中的benched")
    private String newsSelectBencode;

    /**
     * hu xi send
     * 1:content 2:URL
     */
    @Column(name = "cta_destination")
    private Integer ctaDestination;

    @Column(name = "show_proceed")
    private Integer showProceed;

    @Column(name = "news_url")
    private String newsUrl;

    /**
     * 0 全部;多个国家 id 以英文逗号拼接，老数据存在|拼接的情况
     */
    @Column(name = "country_ids")
    @ApiModelProperty("0 全部;多个国家 id 以英文逗号拼接，老数据存在|拼接的情况")
    private String countryIds;

    /**
     * Short description
     */
    @ApiModelProperty("Short description")
    private String description;

    private String content;

    /**
     * planId
     */
    @Column(name = "target_policies")
    private String targetPolicies;
}